import request from '@/utils/request.js'

const teacherHost = '/eduservice/teacher'

export default {

    getByPage(current, size, queryTeacher) {

        return new request({
            url: `${teacherHost}/findByPage/${current}/${size}`,
            method: "post",
            data: queryTeacher
        })

    },
    deleteById(id) {

        return new request({
            url: `${teacherHost}/delete/${id}`,
            method: "post",
        })

    },
    saveTeacher(teacher){
        return new request({
            url:`${teacherHost}/save`,
            method:"post",
            data: teacher
        })


    },
    getDetailById(id){
        return new request({
            url:`${teacherHost}/${id}`,
            method:"get",
        })
    },
    updateTeacher(teacher){
        return new request({
            url:`${teacherHost}/update`,
            method:"post",
            data:teacher
        })
    },
    getAll(){
        return new request({
            url:`${teacherHost}/findAll`,
            method:"get",
        })
    }


}

